﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace SurfaceApplication3
{
    class Bullet
    {
        protected float damages;
        protected Vector2 position;
        protected Vector2 direction;
        protected Texture2D texture;
        public void uptade(){
            position+= direction;
        }

        public Bullet(Texture2D texture, Vector2 position, float speed,float orientation)
        {
            this.texture = texture;
            damages = 100;
            this.position = position;
            this.direction = new Vector2((float)Math.Cos(orientation), (float)Math.Sin(orientation));
            this.direction = speed * this.direction;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texture,position,Color.White);
        }
    }
}
